public abstract class SIM {

  public  abstract void main setNumber(String n);
   public abstract String giveNumber();
  public abstract String giveCorpName();
}
class SIMOfChinaUnicom extends SIM {
    String number;
public  void setNumber(String n) {
        number = n;
    }
 public  String giveNumber() {
        return number;
    }
 public String giveCorpName() {
        return "中国联通";
    }
}
class MobileTelephone {
   SIM card;
  void useSIM(SIM card) {
      this.card=card;
   }
   void showMess() {
      System.out.println("使用的卡是:"+card.giveCorpName()+"提供的");
      System.out.println("手机号码是:"+card.giveNumber());
   }
}
class Application {
   static void main(String args[]) {
      MobileTelephone telephone = new MobileTelephone ();
      SIM sim=new SIMOfChinaMobile();
      sim.setNumber("13887656432");
      telephone.useSIM(sim);
      telephone.showMess();
      sim=new SIMOfChinaUnicom();
      sim.setNumber("13097656437");
      telephone.useSIM(sim);
      telephone.showMess();
   }
}
class SIMOfChinaMobile extends SIM {
    String number;
 public  void setNumber(String n) {
        number = n;
    }
 public String giveNumber() {
        return number;
    }
  public  String giveCorpName() {
        return "中国移动";
    }
}
